<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
         //因为是初学者，所以要把简单问题复杂化，提升对代码的理解
        let list = []
        for (let i = 0; i < 2; i++) {
            list[i] = prompt('请依次输入你的名字以及年龄')
        }
        document.write(`大家好，我叫${list[0]}今年${list[1]}岁`)
    </script>
</body>

</html>